package numbers;


import org.testng.Assert;
import org.testng.annotations.Test;

/**
 * Created with Sergii.Oliinyk IDEA.
 * User: Администратор
 * Date: 21.06.13
 * Time: 7:51
 * To change this template use File | Settings | File Templates.
 */
public class SimpleNumbers {
    public static boolean isPrime(int n){
        if (n == 1) return false;
        for (int i = 2; i * i < n; i++) {
            if (n % i == 0) return false;
        }
        return true;
    }

    @Test
    public void info() {

        Assert.assertTrue(isPrime(3));


    }
}
